<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@ taglib prefix="rich" uri="http://richfaces.ajax4jsf.org/rich" %>
<%@ taglib prefix="a4j" uri="http://richfaces.org/a4j" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Pagina Principal</title>
</head>
<body>
<f:view>
	<h:form>	
	<h:outputLabel value=" Bem vindo: #{loginController.nome}"></h:outputLabel>
	<f:verbatim escape="false"><br></f:verbatim>
	<h:outputLabel value="#{loginController.mensagem}" style="color='red'"/>
	<f:verbatim escape="false"><br></f:verbatim>
	<h:outputLabel value="#{clienteController.messagem}" style="color='red'"/>
	
	
	<rich:panel>
	<h:panelGrid columns="2">
		<h:outputLabel for="login" value="Login: "/>
		<h:inputText id="login" value="#{loginController.login}"  required="true">
			<f:validateLength minimum="3" maximum="20"></f:validateLength>
			<rich:ajaxValidator event="onblur"></rich:ajaxValidator>
		</h:inputText>
	
		<h:outputLabel for="senha" value="Senha: "/>
		<h:inputSecret id="senha" value="#{loginController.senha}" required="true">
			<f:validateLength minimum="3" maximum="10"></f:validateLength>
			<rich:ajaxValidator event="onblur"></rich:ajaxValidator>
		</h:inputSecret>
	
		<h:commandButton action="#{loginController.ChecarLogin}" id="logar" value="Entrar..." binding="#{loginController.botao}"/>
	</h:panelGrid>
	</rich:panel>
	</h:form>	
    
</f:view>
</body>
</html>